/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
#ifndef PLELF_SYMBOL32_H
#define PLELF_SYMBOL32_H

#include <elf/plelfsymboltableenum.h>

namespace PLSDK {

    class PLElf32;

    /**
     * Information about a symbole from the symbole table.
     * Mostly used for internal use.
     */
    class PLELFSymbol32 : public PLELFSymbolTableEnum {
    public:
        /**
         * Constructor.
         */
        PLELFSymbol32() : m_Binding(STInfoBindingGlobal), m_Value(0) {}
        /**
         * Constructor.
         *
         * @param b Binding type how symbols interact.
         * @param v The address of the symbole.
         */
        PLELFSymbol32(PLELFSymbolTableEnum::STInfoBinding b, uintptr_t v) : m_Binding(b), m_Value(v) {}
        /**
         * Get the binding type how to interact.
         *
         * @return The binding type.
         */
        inline PLELFSymbolTableEnum::STInfoBinding binding() {
            return m_Binding;
        }
        /**
         * Get the address value for the symbole.
         *
         * @return The address.
         */
        inline uintptr_t value() {
            return m_Value;
        }
    private:
        PLELFSymbolTableEnum::STInfoBinding m_Binding;
        uintptr_t m_Value;
    };

}

#endif
